<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>QUnit Example</title>
<link rel="stylesheet" href="//code.jquery.com/qunit/qunit-1.16.0.css">
</head>
<body>
	<div id="qunit"></div>
	<div id="qunit-fixture"></div>
	<script src="//code.jquery.com/qunit/qunit-1.16.0.js"></script>
	<script>
		var myClass = {
			a : "abc",

			callback : function() {
				console.log("please override me!");
			},

			execute : function() {
				// do something here
				this.a = this.a + "de";

				this.callback();
			}
		};

		myClass.execute();

		var m = Object.create(myClass);
		m.a = "123";
		m.execute();

		console.log("now I will override the callback function");
		m.callback = function() {
			console.log(this.a + this.a);
		}

		m.execute();
		console.log(m.a);
		
		QUnit.test("Test result of callback function", function(assert) {

			assert.ok(m.a == "123dede", "Passed!");
		});
	</script>
</body>
</html>